package com.xizimall.rest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * 商品查询Controller
 * <p>Title: ItemController</p>
 * <p>Description: </p>
 * <p>华南理工大学研究生</p> 
 * @author	李隆熹
 * @date	2018年4月25日下午3:14:06
 * @version 1.0
 */
import org.springframework.web.bind.annotation.ResponseBody;

import com.xizimall.rest.service.ItemService;
import com.xizimall.common.pojo.XizimallResult;
@Controller
@RequestMapping("/item")
public class ItemController {
     @Autowired
     private ItemService itemService;
     @RequestMapping("/info/{itemId}")
     @ResponseBody
     public XizimallResult getItemBaseInfo(@PathVariable Long itemId){
    	 XizimallResult result=itemService.getItemBaseInfo(itemId);
    	 return result;
     }
     @RequestMapping("/desc/{itemId}")
     @ResponseBody
     public XizimallResult getItemDesc(@PathVariable Long itemId){
    	 XizimallResult result=itemService.getItemDesc(itemId);
    	 return result;
     }
     @RequestMapping("/param/{itemId}")
     @ResponseBody
     public XizimallResult getItemParam(@PathVariable Long itemId){
    	 XizimallResult result=itemService.getItemParam(itemId);
    	 return result;
     }
     
}
